<?php

/**
 * @author Edson5
 * @copyright 2011
 */
 $codigo=$_GET['codigo'];
 $sim=$_GET['si'];
 $do=$_GET['do'];
 $mat=$_GET['ma'];
 $ch=$_GET['c1'];
 $ch2=$_GET['c2'];
 $codt=$_GET['ct'];
 $codigotourtrack=$_GET['ctt'];

$ruta=$_SERVER['DOCUMENT_ROOT']."/viventura/MDHoteles";
$ruta2=$_SERVER['DOCUMENT_ROOT']."/viventura";




include_once("$ruta/conf/CConfig.php");

$query="insert into tour_as (tour_idTour,hoteles_idHot,bloq,conf) values ('$codt','$codigo','$ch','$ch2')";

 CModelo::getInstance()->insertData($query);

$query2="UPDATE tour_has_track SET Estado = '1' WHERE idTourTrack =$codigotourtrack";

CModelo::getInstance()->updateData($query2);

//echo $_SERVER['HTTP_REFERER'];
?>
<script type="text/javascript">
alert("Cambios Realizados");
setTimeout('history.go(-2)',100);
</script>

<!--<input type="button"  class="regrets_button" value="Regresar" onclick="history.go(-3)">
--><?php

//header("Location:".$_SERVER['DOCUMENT_ROOT']."/viventura/MDHoteles");



?>